//
//  FQDPraiseHistory.h
//  FakeQDaily
//
//  Created by mewxiv on 9/5/16.
//  Copyright © 2016 Xensius. All rights reserved.
//

#import <Foundation/Foundation.h>

FOUNDATION_EXPORT NSString *const kPraiseTypeArticle;
FOUNDATION_EXPORT NSString *const kPraiseTypeComment;

@interface FQDPraiseHistoryItem : NSObject

@property (nonatomic, copy) NSString *qdID;
@property (nonatomic, copy) NSString *userId;
@property (nonatomic, assign) BOOL praised;
@property (nonatomic, copy) NSString *praiseType;

@end

@class FQDPost;

@interface FQDPraiseHistory : NSObject

+ (instancetype)sharedHistory;
- (void)praiseWithItem:(FQDPraiseHistoryItem *)praiseItem originalPraiseCount:(NSInteger)originalPraiseCount
    updatePraiseCountBlock:(void (^)(NSInteger praiseCount))updatePraiseCountBlock;
- (void)savePraiseItem:(FQDPraiseHistoryItem *)praiseItem toLocalStorage:(BOOL)saveToLocal;
- (BOOL)userHasPraised:(NSString *)qdID userId:(NSString *)userId;

@end
